package characters;
/**
 * Statistics class provides all the character's statistics values.
 * All the attributes are protected and can be accessed thru methods from
 * Character class.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public class Statistics {

  /**
   * Character's Statistics can be split into 3 differents sections.
   * First the basic statistics, typically the character's statistics according
   * to the class and level (provide by the database). This first part contains
   * the following stat :
   * <ul>
   *  <li>max Hp*</li>
   *  <li>max Mp*</li>
   *  <li>power</li>
   *  <li>health</li>
   *  <li>agility</li>
   *  <li>accuracy</li>
   *  <li>knowledge</li>
   *  <li>will</li>
   *  <li>walk speed</li>
   *  <li>run speed</li>
   *  <li>fly speed</li>
   *  <li>attack speed*</li>
   *  <li>evasion*</li>
   *  <li>block*</li>
   *  <li>parry*</li>
   *  <li>main hand attack*</li>
   *  <li>main hand accuracy*</li>
   *  <li>main hand critic rate*</li>
   *  <li>magic accuracy*</li>
   *  <li>off hand attack*</li>
   *  <li>off hand accuracy*</li>
   *  <li>off hand critic rate*</li>
   * </ul>
   * The second section regroup, mainly, the resistance and magic attributes.
   * This last section contains the following resistance stats :
   * <ul>
   *  <li>magic power*</li>
   *  <li>magical resist*</li>
   *  <li>physical def*</li>
   *  <li>resist Fire</li>
   *  <li>resist Water</li>
   *  <li>resist Wind</li>
   *  <li>resist Earth</li>
   * </ul>
   * Most of these statistics (marked by a <b>*</b>) can have a bonus according to the characer's 
   * equipments. This section will contains each bonus for each stat.
   * <ul>
   *  <li>bonus Hp</li>
   *  <li>bonus Mp</li>
   *  <li>bonus attack speed</li>
   *  <li>bonus evasion</li>
   *  <li>bonus block</li>
   *  <li>bonus parry</li>
   *  <li>bonus attack</li>
   *  <li>bonus accuracy</li>
   *  <li>bonus critic rate</li>
   *  <li>bonus magic accuracy</li>
   *  <li>bonus magic power</li>
   *  <li>bonus physical def</li>
   * </ul>
   */

  
  protected int     maxHp;
  protected int     bonusHp;
  protected int     maxMp;
  protected int     bonusMp;
  protected int     power;
  protected int     health;
  protected int     agility;
  protected int     accuracy;
  protected int     knowledge;
  protected int     will;
  protected double  walkSpeed;
  protected float   runSpeed;
  protected float   flySpeed;
  protected double  attackSpeed;
  protected double  bonusAttackSpeed;
  protected int     evasion;
  protected int     bonusEvasion;
  protected int     block;
  protected int     bonusBlock;
  protected int     parry;
  protected int     bonusParry;
  protected int     mainHandAttack;
  protected int     bonusMainHandAttack;
  protected int     mainHandAccuracy;
  protected int     bonusMainHandAccuracy;
  protected int     mainHandCritRate;
  protected int     bonusMainHandCritRate;
  protected int     magicAccuracy;
  protected int     bonusMagicAccuracy;
  protected int     magicPower;
  protected int     bonusMagicPower;
  protected int     magicalResist;
  protected int     bonusMagicResist;
  protected int     physicalDef;
  protected int     bonusPhyDef;
  protected int     resistFire;
  protected int     resistWater;
  protected int     resistWind;
  protected int     resistEarth;
  protected int     offHandAttack;
  protected int     bonusOffHandAttack;
  protected int     offHandAccuracy;
  protected int     bonusOffHandAccuracy;
  protected int     offHandCritRate;
  protected int     bonusOffHandCritRate;

  /**************************************
   *               GETTER               *
   **************************************/
  /**
   * Returns the total HP value.
   * @return The total HP value as int. 
   */
  public int getTotalHp()
  {
    return this.maxHp + this.bonusHp;
  }
  /**
   * Returns the total MP value.
   * @return The total MP value as int. 
   */
  public int getTotalMp()
  {
    return this.maxMp + this.bonusMp;
  }
  /**
   * Returns the total Attack Speed value.
   * @return The total Attack Speed value as double. 
   */
  public double getTotalAttackSpeed()
  {
    return this.attackSpeed + this.bonusAttackSpeed;
  }
  /**
   * Returns the total Evasion value.
   * @return The total Evasion value as int. 
   */
  public int getTotalEvasion()
  {
    return this.evasion + this.bonusEvasion;
  }
  /**
   * Returns the total Block value.
   * @return The total Block value as int. 
   */
  public int getTotalBlock()
  {
    return this.block + this.bonusBlock;
  }
  /**
   * Returns the total Parry value.
   * @return The total Parry value as int. 
   */
  public int getTotalParry()
  {
    return this.parry + this.bonusParry;
  }
  /**
   * Returns the total Hand Attack value.
   * @return The total Hand Attack value as int. 
   */
  public int getTotalMainHandAttack()
  {
    return this.mainHandAttack + this.bonusMainHandAttack;
  }
  /**
   * Returns the total Hand Accuracy value.
   * @return The total Hand Accuracy value as int. 
   */
  public int getTotalMainHandAccuracy()
  {
    return this.mainHandAccuracy + this.bonusMainHandAccuracy;
  }  
  /**
   * Returns the total Hand Critic Rate value.
   * @return The total Hand Critic Rate value as int. 
   */
  public int getTotalMainHandCritRate()
  {
    return this.mainHandCritRate + this.bonusMainHandCritRate;
  }
  /**
   * Returns the total Magic Accuracy value.
   * @return The total Magic Accuracy Rate value as int. 
   */
  public int getTotalMagicAccuracy()
  {
    return this.magicAccuracy + this.bonusMagicAccuracy;
  }
  /**
   * Returns the total Magic Power value.
   * @return The total Magic Power value as int. 
   */
  public int getTotalMagicPower()
  {
    return this.magicPower + this.bonusMagicPower;
  }
  /**
   * Returns the total Magical Resistance value.
   * @return The total Magical Resistance value as int. 
   */
  public int getTotalMagicalResistance()
  {
    return this.magicalResist + this.bonusMagicResist;
  }
  /**
   * Returns the total Physical Def value.
   * @return The total Physical Def value as int. 
   */
  public int getTotalPhysicalDef()
  {
    return this.physicalDef + this.bonusPhyDef;
  }
  /**
   * Returns the total offHand Attack value, only for ambidextrous.
   * @return The total offHand Attack value as int. 
   */
  public int getTotalOffHandAttack()
  {
    return this.offHandAttack + this.bonusOffHandAttack;
  }
  /**
   * Returns the total offHand Accuracy value, only for ambidextrous.
   * @return The total offHand Accuracy value as int. 
   */
  public int getTotalOffHandAccuracy()
  {
    return this.offHandAccuracy + this.bonusOffHandAccuracy;
  }  
  /**
   * Returns the total offHand Critic Rate value, only for ambidextrous.
   * @return The total offHand Critic Rate value as int. 
   */
  public int getTotaloffHandCritRate()
  {
    return this.offHandCritRate + this.bonusOffHandCritRate;
  }

  /**************************************
   *               SETTER               *
   **************************************/

  /**
   * @param maxHp the maxHp to set
   */
  public void setMaxHp(int maxHp) {
    this.maxHp = maxHp;
  }
  /**
   * @param bonusHp the bonusHp to set
   */
  public void setBonusHp(int bonusHp) {
    this.bonusHp = bonusHp;
  }
  /**
   * @param maxMp the maxMp to set
   */
  public void setMaxMp(int maxMp) {
    this.maxMp = maxMp;
  }
  /**
   * @param bonusMp the bonusMp to set
   */
  public void setBonusMp(int bonusMp) {
    this.bonusMp = bonusMp;
  }
  /**
   * @param power the power to set
   */
  public void setPower(int power) {
    this.power = power;
  }
  /**
   * @param health the health to set
   */
  public void setHealth(int health) {
    this.health = health;
  }
  /**
   * @param agility the agility to set
   */
  public void setAgility(int agility) {
    this.agility = agility;
  }
  /**
   * @param accuracy the accuracy to set
   */
  public void setAccuracy(int accuracy) {
    this.accuracy = accuracy;
  }
  /**
   * @param knowledge the knowledge to set
   */
  public void setKnowledge(int knowledge) {
    this.knowledge = knowledge;
  }
  /**
   * @param will the will to set
   */
  public void setWill(int will) {
    this.will = will;
  }
  /**
   * @param walkSpeed the walkSpeed to set
   */
  public void setWalkSpeed(double walkSpeed) {
    this.walkSpeed = walkSpeed;
  }
  /**
   * @param runSpeed the runSpeed to set
   */
  public void setRunSpeed(float runSpeed) {
    this.runSpeed = runSpeed;
  }
  /**
   * @param flySpeed the flySpeed to set
   */
  public void setFlySpeed(float flySpeed) {
    this.flySpeed = flySpeed;
  }
  /**
   * @param attackSpeed the attackSpeed to set
   */
  public void setAttackSpeed(double attackSpeed) {
    this.attackSpeed = attackSpeed;
  }
  /**
   * @param bonusAttackSpeed the bonusAttackSpeed to set
   */
  public void setBonusAttackSpeed(double bonusAttackSpeed) {
    this.bonusAttackSpeed = bonusAttackSpeed;
  }
  /**
   * @param evasion the evasion to set
   */
  public void setEvasion(int evasion) {
    this.evasion = evasion;
  }
  /**
   * @param bonusEvasion the bonusEvasion to set
   */
  public void setBonusEvasion(int bonusEvasion) {
    this.bonusEvasion = bonusEvasion;
  }
  /**
   * @param block the block to set
   */
  public void setBlock(int block) {
    this.block = block;
  }
  /**
   * @param bonusBlock the bonusBlock to set
   */
  public void setBonusBlock(int bonusBlock) {
    this.bonusBlock = bonusBlock;
  }
  /**
   * @param parry the parry to set
   */
  public void setParry(int parry) {
    this.parry = parry;
  }
  /**
   * @param bonusParry the bonusParry to set
   */
  public void setBonusParry(int bonusParry) {
    this.bonusParry = bonusParry;
  }
  /**
   * @param mainHandAttack the mainHandAttack to set
   */
  public void setMainHandAttack(int mainHandAttack) {
    this.mainHandAttack = mainHandAttack;
  }
  /**
   * @param bonusMainHandAttack the bonusHandAttack to set
   */
  public void setBonusHandAttack(int bonusMainHandAttack) {
    this.bonusMainHandAttack = bonusMainHandAttack;
  }
  /**
   * @param mainHandAccuracy the mainHandAccuracy to set
   */
  public void setMainHandAccuracy(int mainHandAccuracy) {
    this.mainHandAccuracy = mainHandAccuracy;
  }
  /**
   * @param bonusHandAccuracy the bonusHandAccuracy to set
   */
  public void setBonusHandAccuracy(int bonusHandAccuracy) {
    this.bonusMainHandAccuracy = bonusHandAccuracy;
  }
  /**
   * @param mainHandCritRate the mainHandCritRate to set
   */
  public void setMainHandCritRate(int mainHandCritRate) {
    this.mainHandCritRate = mainHandCritRate;
  }
  /**
   * @param bonusHandCritRate the bonusHandCritRate to set
   */
  public void setBonusHandCritRate(int bonusHandCritRate) {
    this.bonusMainHandCritRate = bonusHandCritRate;
  }
  /**
   * @param magicAccuracy the magicAccuracy to set
   */
  public void setMagicAccuracy(int magicAccuracy) {
    this.magicAccuracy = magicAccuracy;
  }
  /**
   * @param bonusMagicAccuracy the bonusMagicAccuracy to set
   */
  public void setBonusMagicAccuracy(int bonusMagicAccuracy) {
    this.bonusMagicAccuracy = bonusMagicAccuracy;
  }
  /**
   * @param magicPower the magicPower to set
   */
  public void setMagicPower(int magicPower) {
    this.magicPower = magicPower;
  }
  /**
   * @param bonusMagicPower the bonusMagicPower to set
   */
  public void setBonusMagicPower(int bonusMagicPower) {
    this.bonusMagicPower = bonusMagicPower;
  }
  /**
   * @param magicalResist the magicalResist to set
   */
  public void setMagicalResist(int magicalResist) {
    this.magicalResist = magicalResist;
  }
  /**
   * @param bonusMagicResist the bonusMagicResist to set
   */
  public void setBonusMagicResist(int bonusMagicResist) {
    this.bonusMagicResist = bonusMagicResist;
  }
  /**
   * @param physicalDef the physicalDef to set
   */
  public void setPhysicalDef(int physicalDef) {
    this.physicalDef = physicalDef;
  }
  /**
   * @param bonusPhyDef the bonusPhyDef to set
   */
  public void setBonusPhyDef(int bonusPhyDef) {
    this.bonusPhyDef = bonusPhyDef;
  }
  /**
   * @param resistFire the resistFire to set
   */
  public void setResistFire(int resistFire) {
    this.resistFire = resistFire;
  }
  /**
   * @param resistWater the resistWater to set
   */
  public void setResistWater(int resistWater) {
    this.resistWater = resistWater;
  }
  /**
   * @param resistWind the resistWind to set
   */
  public void setResistWind(int resistWind) {
    this.resistWind = resistWind;
  }
  /**
   * @param resistEarth the resistEarth to set
   */
  public void setResistEarth(int resistEarth) {
    this.resistEarth = resistEarth;
  }
  /**
   * @param offHandAttack the offHandAttack to set
   */
  public void setOffHandAttack(int offHandAttack) {
    this.offHandAttack = offHandAttack;
  }
  /**
   * @param bonusOffHandAttack the bonusOffHandAttack to set
   */
  public void setBonusOffHandAttack(int bonusOffHandAttack) {
    this.bonusOffHandAttack = bonusOffHandAttack;
  }
  /**
   * @param offHandAccuracy the offHandAccuracy to set
   */
  public void setOffHandAccuracy(int offHandAccuracy) {
    this.offHandAccuracy = offHandAccuracy;
  }
  /**
   * @param bonusOffHandAccuracy the bonusOffHandAccuracy to set
   */
  public void setBonusOffHandAccuracy(int bonusOffHandAccuracy) {
    this.bonusOffHandAccuracy = bonusOffHandAccuracy;
  }
  /**
   * @param offHandCritRate the offHandCritRate to set
   */
  public void setOffHandCritRate(int offHandCritRate) {
    this.offHandCritRate = offHandCritRate;
  }
  /**
   * @param bonusOffHandCritRate the bonusOffHandCritRate to set
   */
  public void setBonusOffCritRate(int bonusOffHandCritRate) {
    this.bonusOffHandCritRate = bonusOffHandCritRate;
  }
}